<template>
  <div class="main">
    <el-drawer :modal-append-to-body="false" :append-to-body="true" title="结算详情" size="72%" :withHeader="false"
      :visible.sync="dialogVisible" @close="handleClose" :show-close="true">
      <div style="position: relative;margin-bottom: 10px;">
        <div class="drawerTitle">
          <span>结算详情</span>
          <div class="close" @click="handleClose">
            <i class="el-icon-close" style="font-size: 24px;"></i>
          </div>
        </div>
      </div>
      <el-row>
        <el-form ref="ruleForm" :model="ruleForm" label-width="100px" class="demo-ruleForm">
          <div class="informationTitleView">
            <div class="leftBox">
              <div class="leftborder" />
              <div class="text">结算详情</div>
            </div>
            <div class="right" />
          </div>
          <el-col :span="11">
            <el-form-item label="供货商:">
              {{realname_details.supplier_name}}
            </el-form-item>
          </el-col>
          <el-col :span="11">
            <el-form-item label="结算批次号:">
              {{realname_details.batch_number}}

            </el-form-item>
          </el-col>
          <el-col :span="11">
            <el-form-item label="结算范围:">
              {{realname_details.start_time + '~' + realname_details.end_time}}
            </el-form-item>
          </el-col>
          <el-col :span="11">
            <el-form-item label="结算金额:">
              {{realname_details.total_price}}
              <el-button type="text" style="margin-left: 10px;" @click="settlement_details">明细</el-button>
            </el-form-item>

          </el-col>
          <el-col :span="11">
            <el-form-item label="结算人:">
            {{realname_details.delay_admin_name}}
            </el-form-item>
          </el-col>
          <el-col :span="11">
            <el-form-item label="结算订单数:">
            {{realname_details.set_order_num}}
            </el-form-item>
          </el-col>
          <el-col :span="11">
            <el-form-item label="创建时间:">
            {{realname_details.created_at}}
            </el-form-item>
          </el-col>
        </el-form>
      </el-row>
    </el-drawer>
    <moneydetail ref="refmoney"/>
  </div>
</template>
<script>
  import moneydetail from './moneydetail.vue'
  export default {
    components: {
      moneydetail
    },
    props: ["realname_details"],
    data() {
      return {
        dialogVisible: false,
        ruleForm: {},
        supplierId:'',
        id:''
      }
    },
    created() {},
    methods: {
      //查看明细
      settlement_details() {
          this.$refs.refmoney.opens(this.id,this.supplierId)
      },
      open(id,supplierID) {
        this.id = id
        this.supplierId = supplierID
        this.dialogVisible = true
      },
      handleClose() {
        this.dialogVisible = false
      },
    }
  }
</script>

<style scoped lang="scss">

</style>
